﻿<Window x:Class="OfficeBusiness.View.BaseView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:v="clr-namespace:OfficeBusiness.View"
        xmlns:vm="clr-namespace:OfficeBusiness.ViewModel"
        Title="BaseView" Height="600" Width="800">
    <Window.Resources>
        <DataTemplate DataType="{x:Type vm:DepartmentViewModel}">
            <v:DepartmentView/>
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:EmployeeViewModel}">
            <v:EmployeeView/>
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:SelectViewModel}">
            <v:SelectView/>
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:ProjectViewModel}">
            <v:ProjectsView/>
        </DataTemplate>
        <DataTemplate DataType="{x:Type vm:WorksViewModel}">
            <v:WorksView/>            
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0">
            <ContentControl Content="{Binding Path=SelectViewModel}"></ContentControl>
        </Grid>
        <Grid Grid.Column="1">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <GroupBox Grid.Row="0" Content="{Binding Path=DepartmentViewModel}" Header="Department" Visibility="{Binding Path=DepartmentVisibility}"></GroupBox>
            <GroupBox Grid.Row="1" Content="{Binding Path=EmployeeViewModel}" Header="Employees" Visibility="{Binding Path=EmployeesVisibility}"></GroupBox>
            <GroupBox Grid.Row="0" Content="{Binding Path=ProjectViewModel}" Header="Projects" Visibility="{Binding Path=ProjectsVisibility}"></GroupBox>
            <GroupBox Grid.Row="1" Content="{Binding Path=WorksViewModel}" Header="Works" Visibility="{Binding Path=WorksVisibility}"></GroupBox>
        </Grid>
    </Grid>
</Window>
